package com.itheima.ioTest_2;

import java.io.*;
import java.util.Arrays;

public class testUnicod4 {
    public static void main(String[] args) throws IOException {
        BufferedReader br=new BufferedReader(new FileReader("IO\\b.txt"));
        String s = br.readLine();
        System.out.println("读取的数据为"+s);
        br.close();
        String[] sp = s.split(" ");
        int []arr=new int[sp.length];
        for (int i = 0; i < sp.length; i++) {
            String q=sp[i];
            int i1 = Integer.parseInt(q);
            arr[i]= i1;
        }
        Arrays.sort(arr);
        System.out.println(Arrays.toString(arr));
        BufferedWriter bw=new BufferedWriter(new FileWriter("IO\\b.txt"));
        for (int i = 0; i < arr.length; i++) {
            bw.write(arr[i]+" ");
            bw.flush();
        }
        bw.close();
    }
}
